package ystp.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import ystp.model.Shengchanqiyelinxuan;
import ystp.model.ShengchanqiyelinxuanExample;

public interface ShengchanqiyelinxuanMapper {

    List<Map<String, Object>> findPinguiAll(@Param("xiangmuid") String ppxiangmuId,
                                              @Param("startindex") int ppStartIndex,
                                              @Param("pagesize") int ppPageSize);

    List<Map<String, Object>> findPinzhongAll(@Param("xiangmuid") String ppxiangmuId,
                                            @Param("startindex") int ppStartIndex,
                                            @Param("pagesize") int ppPageSize);

    List<Map<String, Object>> findPinguiBySuijilunci(@Param("xiangmuid") String ppxiangmuId,@Param("suijilunci") String ppsuijilunci,
                                            @Param("startindex") int ppStartIndex,
                                            @Param("pagesize") int ppPageSize);

    List<Map<String, Object>> findPinzhongBySuijilunci(@Param("xiangmuid") String ppxiangmuId,@Param("suijilunci") String ppsuijilunci,
                                                     @Param("startindex") int ppStartIndex,
                                                     @Param("pagesize") int ppPageSize);

    List<Map<String, Object>> findPinzhongCustom(@Param("xiangmuid") String ppxiangmuId,
                                                       @Param("startindex") int ppStartIndex,
                                                       @Param("pagesize") int ppPageSize);

    List<Map<String, Object>> findPinguiByPinzhong(@Param("xiangmuid") String ppxiangmuId,@Param("pinzhongbianhao")String ppPinzhongOne);

    List<Map<String, Object>> findPinguiFenlei(@Param("xiangmuid") String ppxiangmuId,@Param("pinzhongbianhao")String ppPinzhongOne);

    List<Map<String, Object>> findShengchanqiyeByPingui(@Param("xiangmuid") String ppxiangmuId,
                                                        @Param("pinguixuhao")String ppPinguiOne);

    List<Map<String, Object>> findShengchanqiyeByPinguiResult(@Param("xiangmuid") String ppxiangmuId,
                                                        @Param("pinguixuhao")String ppPinguiOne,@Param("userid")String ppuserId,@Param("lunci")int pplunci);

/*    List<Map<String, Object>> findShengchanqiyeByPinguiScore(@Param("xiangmuid") String ppxiangmuId,
                                                              @Param("pinguixuhao")String ppPinguiOne,@Param("lunci")int pplunci);*/


    List<Map<String, Object>> findShengchanqiyeByPinguiScore(@Param("xiangmuid") String ppxiangmuId,
                                                             @Param("pinguixuhao")String ppPinguiOne);

    Object getPinguiCount(@Param("xiangmuid") String ppxiangmuId,@Param("suijilunci") String ppsuijilunci,
                            @Param("startindex") int ppStartIndex,
                            @Param("pagesize") int ppPageSize);

    List<Map<String, Object>> chouqupinzhong(@Param("pinguileibie") String pppinguileibie);

    List<Map<String, Object>> findSmplingedPinguiBySuijilunciAndPinguileibie(@Param("suijilunci") String ppsuijilunci,
                                                        @Param("pinguileibie")String pppinguileibie);

    int countByExample(ShengchanqiyelinxuanExample example);

    int deleteByExample(ShengchanqiyelinxuanExample example);

    int deleteByPrimaryKey(String id);

    int insert(Shengchanqiyelinxuan record);

    int insertSelective(Shengchanqiyelinxuan record);

    List<Shengchanqiyelinxuan> selectByExample(ShengchanqiyelinxuanExample example);

    Shengchanqiyelinxuan selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") Shengchanqiyelinxuan record, @Param("example") ShengchanqiyelinxuanExample example);

    int updateByExample(@Param("record") Shengchanqiyelinxuan record, @Param("example") ShengchanqiyelinxuanExample example);

    int updateByPrimaryKeySelective(Shengchanqiyelinxuan record);

    int updateByPrimaryKey(Shengchanqiyelinxuan record);

    List<Map<String, Object>> findPinzhong(@Param("xiangmuid") String ppxiangmuId,@Param("lunci") int ppLunci,@Param("drugname") String ppDrugname,
                                           @Param("guigexuhao") String ppGuigexuhao,
                                           @Param("jiyao") String ppJiyao,
                                           @Param("jicaiyao") String ppJicaiyao,
                                           @Param("startindex") int ppStartIndex,
                                           @Param("pagesize") int ppPageSize);

    Object countTotal(@Param("xiangmuid")String ppXiangmuId,@Param("userid")String ppUserId,@Param("lunci")int ppLunci);

    List<Map<String, Object>> findPinguiByPinzhongLunci(@Param("xiangmuid") String ppxiangmuId,@Param("pinzhongbianhao")String ppPinzhongOne,@Param("lunci")int ppLunci);

    List<Map<String, Object>> findPinguiFenleiLunci(@Param("xiangmuid") String ppxiangmuId,@Param("pinzhongbianhao")String ppPinzhongOne,@Param("lunci")int ppLunci);
}